{% extends "base.html" %}

{% block title %}添加监控数据{% endblock %}

{% block content %}
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title mb-0">{{ point.name }} - 添加监控数据</h4>
                </div>
                <div class="card-body">
                    <form method="POST">
                        <div class="mb-3">
                            <label for="dissolved_oxygen" class="form-label">溶解氧(mg/L)</label>
                            <input type="number" step="0.01" class="form-control" id="dissolved_oxygen" name="dissolved_oxygen" required>
                        </div>
                        <div class="mb-3">
                            <label for="ph_value" class="form-label">pH值</label>
                            <input type="number" step="0.01" class="form-control" id="ph_value" name="ph_value" required>
                        </div>
                        <div class="mb-3">
                            <label for="temperature" class="form-label">温度(℃)</label>
                            <input type="number" step="0.1" class="form-control" id="temperature" name="temperature" required>
                        </div>
                        <div class="mb-3">
                            <label for="ammonia_nitrogen" class="form-label">氨氮(mg/L)</label>
                            <input type="number" step="0.01" class="form-control" id="ammonia_nitrogen" name="ammonia_nitrogen" required>
                        </div>
                        <div class="mb-3">
                            <label for="turbidity" class="form-label">浊度(NTU)</label>
                            <input type="number" step="0.01" class="form-control" id="turbidity" name="turbidity" required>
                        </div>
                        <div class="d-grid gap-2">
                            <button type="submit" class="btn btn-primary">添加</button>
                            <a href="{{ url_for('monitor.view_point', point_id=point.id) }}" class="btn btn-secondary">返回</a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 